<?php
/**
 * Created by PhpStorm.
 * Date: 2019/12/2 9:52
 */
date_default_timezone_set('PRC'); //设置中国时区
$content = date('Y-m-d H:i:s') . PHP_EOL;
swoole_async_writefile(__DIR__ . "/1.log",$content,function($filename) {
    echo "success" . PHP_EOL;
}, FILE_APPEND);

echo "start" . PHP_EOL;